This page last changed on Nov 12, 2008 by scytacki.

Summary

If the IP address of the host running a jnlp-servlet changes, then some jardiffs will fail.
This happens if the old version of a jar came from the old IP and the new version comes from the new IP.

Details

For example

  1. if a jar is downloaded by webstart with this url: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20080827.195546-100
  2. then IP address of jnlp.concord.org changes
  3. then webstart downloads a jardiff using this url: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100
  4. when webstart tries to apply this jardiff to the current-version-id jar file from the cache it fails and doesn't recover

Affected versions

This has been verified on windows with java 1.6.0_07.

Basic Steps to Replicate

Changing the IP address a server

In production this happens when we get a new server and migrate services to the new server. The domain name stays the same just the IP changes.

For Testing you can use ssh tunneling and hosts file.
Using the example above you can change the ip by:

  • on a machine with ssh and nothing running on port 80 run:
    sudo ssh -L 80:jnlp.concord.org:80 username@localhost
  • on the windows machine put the following in:
    \WINDOWS\system32\drivers\etc\hosts
    <IP Address of machine with ssh> jnlp.concord.org
  • test it
    • ping jnlp.concord.org (you should see the ip of machine with ssh)
    • browse to http://jnlp.concord.org you should see a tomcat page

Notes

Exception

This is an example exception, the jar that you see in the error will probably be different.

 com.sun.deploy.net.FailedDownloadException: Unable to load resource: (http://jnlp.concord.org/dev/org/concord/portfolio/portfolio.jar?version-id=0.1.0-20080827.194604-120&current-version-id=0.1.0-20080331.190318-58, 0.1.0-20080827.194604-120)
        at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
        at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
        at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source) 
...

Log

Here is the last bit of the output in the console during the second time. This is with deployment.trace.level=all set in deployment.properties.

network: isUpdated: true
basic: LaunchDesc location: http://jnlp.concord.org/dev/org/concord/maven-jnlp/java-checker/java-checker-0.1.0-20081009.173859.jnlp
network: Created version ID: 0.1.0.20081009.173802.106
network: Created version ID: 0.1.0.20080827.195546.100
network: Cache entry not found [url: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar, version: 0.1.0-20081009.173802-106]
network: Created version ID: 1.6.0.07+
network: Created version ID: 1.6.0.07
basic: Offline mode: false
IsInCache: false
forceUpdate: true
needUpdate: true
Installed JRE: JREInfo for index 3:
    platform is: 1.6
    product is: 1.6.0_07
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre1.6.0_07\bin\javaw.exe
    osname is: Windows
    osarch is: x86
    enabled is: true
    registered is: true
    system is: false

IsInstaller: false
network: Total size to download: -1
network: Created version ID: 0.1.0.20081009.173802.106
network: Created version ID: 0.1.0.20080827.195546.100
network: Cache entry not found [url: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar, version: 0.1.0-20081009.173802-106]
network: Connecting http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100 with proxy=HTTP @ /127.0.0.1:8008
network: Connecting socket://127.0.0.1:1644 with proxy=DIRECT
network: Connection http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100, /127.0.0.1:8008java.net.ConnectException: Connection refused: connect failed: removed from proxy cache
network: ResponseCode for http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100 : 200
network: Encoding for http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100 : 
network: Sever response: (length: 22531, lastModified: Thu Oct 09 13:46:23 EDT 2008, downloadVersion: 0.1.0-20081009.173802-106, mimeType: application/x-java-archive-diff)
network: Created version ID: 0.1.0.20081009.173802.106
network: Created version ID: 0.1.0.20081009.173802.106
network: Created version ID: 0.1.0.20081009.173802.106
network: Downloading resource: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100
	Content-Length: 22,531
	Content-Encoding: 
network: Wrote URL http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100 to File C:\Documents and Settings\scytacki\Desktop\JnlpCache\LongFolderTest\LongFolderTest2\6.0\54\66908cb6-14933b11-0.1.0-20081009.173802-106--temp
network: Disconnect connection to http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100
network: Created version ID: 0.1.0.20080827.195546.100
network: Created version ID: 0.1.0.20080827.195546.100
network: Remove cache entry: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar
network: Cache entry not found [url: http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar, version: 0.1.0-20080827.195546-100]
network: Apply jardiff for http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar between 0.1.0-20080827.195546-100 and 0.1.0-20081009.173802-106
#### Java Web Start Error:
#### Unable to load resource: (http://jnlp.concord.org/dev/org/concord/javachecker/javachecker.jar?version-id=0.1.0-20081009.173802-106&current-version-id=0.1.0-20080827.195546-100, 0.1.0-20081009.173802-106)
Document generated by Confluence on Jan 27, 2014 16:56